package com.ewzj.bigdata.mvp.ui.activity

import android.content.Intent
import android.os.Bundle
import com.ewzj.bigdata.R
import com.ewzj.bigdata.di.component.DaggerNormalComponent
import com.ewzj.bigdata.di.module.NormalModule
import com.ewzj.bigdata.mvp.contract.NormalContract
import com.ewzj.bigdata.mvp.presenter.NormalPresenter
import com.jakewharton.rxbinding2.view.RxView
import com.jess.arms.base.BaseActivity
import com.jess.arms.di.component.AppComponent
import com.jess.arms.utils.DeviceUtils
import kotlinx.android.synthetic.main.activity_about.*
import kotlinx.android.synthetic.main.titile_red.*

class AboutActivity : BaseActivity<NormalPresenter>(),NormalContract.View {
    override fun setupActivityComponent(appComponent: AppComponent?) {
        DaggerNormalComponent.builder().appComponent(appComponent).normalModule(NormalModule(this))
                .build().inject(this)
    }

    override fun initView(savedInstanceState: Bundle?): Int {
        return R.layout.activity_about
    }

    override fun initData(savedInstanceState: Bundle?) {
        tv_title.setText("关于觅窝")
        tv_version.setText("版本号：" + DeviceUtils.getVersionName(this))
        RxView.clicks(layout_feedback).subscribe({startActivity(Intent(this,FeedBackActivity::class.java))})
        RxView.clicks(iv_back).subscribe({finish()})
    }

    override fun showLoading() {
    }

    override fun launchActivity(intent: Intent?) {
    }

    override fun hideLoading() {
    }

    override fun killMyself() {
    }

    override fun showMessage(message: String?) {
    }

}
